## -*- coding: utf-8 -*-
## base.html
## This head_more is overrideable to put more into head
<%page args="title='base',pagehelp='not'"/>
<%
    c.attributes = {}
%>

<%def name="head_more()"></%def>
<%def name="box2()">
        <div class="box box2">
            ${caller.body()}
        </div>
</%def>
<%def name="messages()">

                <div  id="hiddenmessage" class="corner_box statusmsgboxrc" style="display:none;">
                    <div class="corner_top"><div></div></div>
                    <div class="corner_content">
                        hidden message
                    </div>
                    <div class="corner_bottom"><div></div></div>
                </div>
                <script type="text/javascript">
                $(document).ready(function(){
                   
                    ${h.error_box()}
                    ${h.msg_box()}
                });
                </script>
</%def>
<%def name="header()">
<div id="hd">
    <div class="header-wrapper">
        <div>
            <div id="topnav">
                <h1><a href="/">DemiSauce</a></h1>
                <ul style="margin: 25px 0px 0px 0px;padding:10px 0 0;" class="topnav">
                % if c.user and c.user.isadmin:
                
                    <li><a href="/dashboard" class="${h.is_current(['/dashboard',None,'/helpadmin','/environment','/home/css','/home/formcss'])}" >Home</a></li>
                    <li><a href="/cms" class="${h.is_current(['/cms'])}" >CMS</a></li>
                    <li><a href="/email" class="${h.is_current(['/email'])}" >Email Templates</a></li>
                    <li><a href="/comment" class="${h.is_current(['/comment'])}" >Comment's</a></li>
                    <li><a href="/site/view" class="${h.is_current(['/site','/account','/groupadmin','/poll'])}" >Account</a></li>
                    % if c.user.issysadmin:
                    <li><a href="/admin" class="${h.is_current(['/admin'])}" >Admin</a></li>
                    % endif
                
                % else:
                    <li><a href="/c/features" class="${h.is_current(['/c'])}" >Features</a></li>
                % endif
                </ul>
            </div>
            <div id="topnav-aux">
                <div>
                    <form id="search" action="" name="searchform">
                        <input id="searchGadget" class="oc-input-typeText" type="text" accesskey="4" title="Search site" size="10" name="search_for"/>
                    </form>
                </div>
                <div id="topnav-aux-menu">
                % if c.user:
                    <a href="#" rel="facebox" id="facebox_show_href">Help</a> |
                    <a href="/account/settings">Profile</a> |
                    <a href="/account/logout">Logout</a>
                % else:
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="/account/signup">Signup</a> |
                    <a href="/account/signin">Login</a>
                % endif
                </div>
            </div>
        </div>
    </div>
</div>
<div id="subnav" >
    <div class="header-wrapper">
        <ul class="topnav">
            
            % if c.user and c.user.isadmin and ('current' == h.is_current(['/dashboard',None,'/helpadmin'])):
                <li><a href="/dashboard" class="${h.is_current(['/dashboard'])}">Dashboard</a></li>
                <li><a href="/helpadmin" class="${h.is_current(['/helpadmin'])}">Help/Feedback</a></li>
            % elif c.user and c.user.isadmin and ('current' == h.is_current(['/account','/site','/groupadmin','/poll'])):
                <li><a href="/account/settings" class="${h.is_current(['/account/settings'])}">profile</a></li>
                <li><a href="/site/view" class="${h.is_current(['/site/view'])}">siteinfo</a></li>
                <li><a href="/site/help" class="${h.is_current(['/site/help'])}">Help System</a></li>
                <li><a href="/site/cmntconfig" class="${h.is_current(['/site/cmntconfig'])}">Comment System</a></li>
                <li><a href="/groupadmin" class="${h.is_current(['/groupadmin'])}">Groups</a></li>
                <li><a href="/poll" class="${h.is_current(['/poll'])}">Polls</a></li>
            % elif c.user and c.user.issysadmin and ('current' == h.is_current(['/admin','/environment', '/home/css','/home/formcss'])):
                <li><a href="/admin" class="${h.is_current(['/admin'])}">Site's</a></li>
                <li><a href="/environment" class="${h.is_current(['/environment'])}">environment</a></li>
                <li><a href="/home/csscolors"  class="${h.is_current(['/home/csscolors'])}">css colors</a></li>
                <li><a href="/home/cssform" class="${h.is_current(['/home/cssform'])}">css form</a></li>
            % endif
        </ul>
    </div>
</div>
</%def>
<%def name="sidebar_top()">
    <div id="sidebartop" ></div>
</%def>
<%def name="sidebar(*args,**kwargs)">
        <div class="yui-b sidebar">

            ${self.sidebar_top()}

        </div>
</%def>
<%def name="footer()">
    <div id="ft">
        <div id="ft-content">
            <ul id="footer-nav">
                <li><a href="#">Project</a>
                  <ul>
                    <li><a href="http://doc.demisauce.org">Documentation</a></li>
                    <li><a href="http://demisauce.googlecode.com">Community</a></li>
                    <li><a href="/account/signin">Admin Login</a></li>
                    <li><a href="file:///Users/aaron/Dropbox/demisauce/demisauce/trunk/docs/.build/html/index.html">Documentation</a></li>
                  </ul>
                </li>
                <li><a href="/c/features">Features</a>
                  <ul>
                    <li><a href="/">Home</a></li>
                    % if c.user and c.user.isadmin:
                    <li><a href="/cms">Cms Admin</a></li>
                    <li><a href="/email/">Email Admin</a></li>
                    <li><a href="/environment">environment</a></li>
                    <li><a href="/home/csscolors">css colors</a></li>
                    <li><a href="/home/cssform">css form</a></li>
                    <li><a href="/home/cssdialog">css Dialog form</a></li>
                    % endif
                    
                  </ul>
                </li>
                <li><a href="#">Blogs</a>
                  <ul>
                    <li><a href="http://apotlatch.wordpress.com/category/demisauce/">Aaron</a></li>
                    <li><a href="/"></a></li>
                  </ul>
                    <a href="#">Links</a>
                    <ul>
                      <li><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide">Mozilla JS</a></li>
                      <li><a href="http://www.jquery.com">JQuery</a></li>
                      <li><a href="#" class="test_humanmsg">Show Test Message</a></li>
                    </ul>
                </li>
                <li><a href="#">Links</a>
                  <ul>
                    <li><a href="http://www.makotemplates.org/docs/syntax.html">Mako</a></li>
                    <li><a href="http://www.formencode.org/htmlfill.html">formencode.org</a></li>
                    <li><a href="http://www.sqlalchemy.org/docs/04/">sqlalchemy</a></li>
                    <li><a href="http://jinja.pocoo.org/2/documentation/">jinja2</a></li>
                    <li><a href="http://docs.pylonshq.com/index.html">Pylons</a></li>
                    <li><a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">rSt</a></li>
                    <li><a href="http://pythonpaste.org/tempita/">tempita</a></li>
                  </ul>
                </li>
                <li><a href="#">Support</a>
                  <ul>
                    <li><a href="#" rel="facebox" id="facebox_show_href">Help</a></li>
                    <li><a href="#" id="test_humanmsg">Msg</a></li>
                    <li><a href="#" id="test_activity">post activity</a></li>
                    <li><a href="#" class="ds_activity" activity="wow, it worked">activity2</a></li>
                    <li><a href="http://www.google.com" class="ds_activity">google url activity</a></li>
                  </ul>
                </li>
            </ul>
        </div>
    </div>
    <script>
        jQuery(document).ready(function() {
            
            //alert($.ds.gears)
            $.ds.gears.init({debug:false});
            
            jQuery('#test_humanmsg').click(function() {
                $.ds.humanMsg.displayMsg('<strong>Success:</strong> <span class="indent">You clicked \''+jQuery(this).text()+'\'</span>');
                return false;
            })
            jQuery('#test_activity').click(function() {
                var action = prompt('What activity do you want to confirm?');
                $.ds.dsactivity({activity:action,custom:{good:'great',tag1:'is a tag'},category:action})
                $.ds.humanMsg.displayMsg('<strong>Activity:</strong> <span class="indent">\''+action+'\'</span>');
                return false;
            })
        
            //$.ds.dsactivity({use_url:true})
            $('a.ds_activity').dsactivity({category:'viewing'});
            
        });
    </script>
</%def>

<%def name="ds_help_overlay()">

    <script type="text/javascript" >
        jQuery(document).ready(function($) {
            /*
            $.fn.dshelp.rating = function(txt) {
                return 'yup';
            };
            */
            $('a[rel*=facebox]').dshelp({opacity : .1,
                base_url: '${c.base_url}',
                site_slug: '${c.adminsite_slug}',
                use_current_url: true
            });
            
        })
    </script>

</%def>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
    <title>${self.title()} on Demisauce</title>
    <link rel="stylesheet" href="/css/local.css" />
    <script type="text/javascript" src="/js/jquery-1.2.6.pack.js"></script>
    <script type='text/javascript' src='/js/jquery.dimensions.js'></script>
    <script type="text/javascript" src="/js/ui.mouse.js"></script>
    <script type="text/javascript" src="/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="/js/jquery.treeview.js"></script>
    <script type="text/javascript" src="/js/ui.draggable.js"></script>
    <script type="text/javascript" src="/js/ui.sortable.js"></script>
    <script type="text/javascript" src="/js/jquery.form.js"></script>
    <script type="text/javascript" src="/js/jquery.hotkeys.js"></script>
    <script type="text/javascript" src="/js/ds.adminbase.js"></script>
    <script type="text/javascript" src="/js/ds.base.js"></script>
    <script type="text/javascript" >
        jQuery(document).ready(function($) {
            $.ds.defaults.site_slug = 'demisauce.org';
        })
    </script>
    <script type="text/javascript" src="/js/ds.slugeditor.js"></script>
    <script type="text/javascript" src="/js/jquery.tooltip.js"></script>
    <script type="text/javascript" src="/js/facebox.js"></script>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    
    <script type='text/javascript' src='/js/jquery.bgiframe.min.js'></script>
    <script type='text/javascript' src='/js/jquery.autocomplete.js'></script>
    <link rel="stylesheet" type="text/css" href="/js/jquery.autocomplete.css" />
    
    <script type="text/javascript" src="/js/gears_init.js"></script>
    <script type="text/javascript" src="/js/ds.gears.js"></script>
    
    <link rel="stylesheet" href="/css/ds.widgets.css" />
    <link rel="stylesheet" href="/js/jquery.treeview.css" />
    <!--<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/skin.css" />-->
    ${self.head_more()}
    
</head>


${next.body()}
